package com.jml.FenBuShiLock;


import org.apache.curator.framework.CuratorFramework;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class ZKCurator {

	private CuratorFramework client=null;//zk客户端

	static final Logger log = LoggerFactory.getLogger(ZKCurator.class);

	public ZKCurator(CuratorFramework client){
		this.client=client;
	}


	/*
	 * 初始化操作
	 *
	 * */
	public void init(){
		client.usingNamespace("zk-curator-connector");
	}


	/*
	 * 判断zk是否连接
	 *
	 * */
	public boolean isZkAlive(){
		return client.isStarted();
	}

}
